{% set clazz = "records" %}
{% set title = "绑定记录" %}
{% extends './modules/common/templates/main.html' %}
{% block style %}
  <link rel="stylesheet" type="text/css" href="{{ '/static/css/home.css'|version }}" />
{% endblock %}
{% block content %}
  {% if !nested %}
    <header class="bar bar-header">
      {{ macro.back() }}
      <h1 class="title">{{ title }}</h1>
    </header>
  {% endif %}
  <section>
    {% if list.length %}
    <div id="records">
      {% for item in list %}
        <div class="list round hspace">
          <div class="item text-sm" ui-mode="20px">
            <span class="text">
              {{ item.roomName }}
              <p class="text-sm text-gray">{{ item.bindTime|date('m-d H:i:s') }}</p>
            </span>
            <span class="text-right text-sm {% if item.hkIndentity == 1 %}text-red{% elif item.hkIndentity == 4 %}text-green{% endif %}">{{ item.hkIndentity|bindType }}</span>
          </div>
        </div>
      {% endfor %}
    </div>
    {% else %}
      <div class="plate">
        <div class="draw">
          <img src="http://7xjyap.com2.z0.glb.qiniucdn.com/image-2f0df3ff-2a9a-4367-a7df-bd53231b0a9f.png" alt="空白">
          <h4 class="title">您还没有绑定记录</h4>
        </div>
      </div>
    {% endif %}
  </section>
  {% raw %}
    <script id="recordsTempl" type="text/swig-template">
      {% for item in list %}
        <div class="list round hspace">
          <div class="item text-sm" ui-mode="20px">
            <span class="text">
              {{ item.roomName }}
              <p class="text-sm text-gray">{{ item.bindTime|date('m-d H:i:s') }}</p>
            </span>
            <span class="text-right text-sm {% if item.hkIndentity == 1 %}text-red{% elif item.hkIndentity == 4 %}text-green{% endif %}">{{ item.hkIndentity|bindType }}</span>
          </div>
        </div>
      {% endfor %}
    </script>
  {% endraw %}
{% endblock %}
{% block script%}
  {% parent %}
  <script src="{{ '/static/js/house.js'|version }}"></script>
{% endblock %}